home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / gfx / x11 / xmountains.lha / README next >
Text File  |  2003-06-09  |  5KB  |  118 lines

  1. Xmountains is a X11 based fractal landscape generator. It generates
  2. random fractal surfaces and displays them in a window. While the
  3. program is running the fractal is continuously extended on the right
  4. and the image is scrolled from right to left to expose the newly
  5. generated area.
  6.  
  7. This distribution contains an Imakefile. If your X-window software has
  8. been correctly installed a Makefile appropriate to your system can be
  9. generated from this using the command "xmkmf". Once this has been done
  10. the program is compiled with the command "make".
  11.  
  12. ./xmountains: version 2.2
  13. usage: ./xmountains -[bqgdPEmMrBZIASFTCapcevfRltxsXYH]
  14.  -b       [false] use root window 
  15.  -q       [false] reset root window on exit
  16.  -g string     window geometry
  17.  -d string     display
  18.  -P filename   write PID to file
  19.  -E       [false] toggle explicit expose events 
  20.  -m       [false] print map 
  21.  -M       [false] implement reflections 
  22.  -r int   [20] # columns before scrolling 
  23.  -B int   [80] # shades in a colour band
  24.  -n int   [245] # number of colours
  25.  -Z int   [10] time to sleep before scrolling
  26.  -I float [40.000000] vertical angle of light 
  27.  -A float [0.000000] horizontal angle of light 
  28.  -S float [0.600000] vertical stretch 
  29.  -T float [0.500000] vertical shift 
  30.  -W float [0.000000] sealevel 
  31.  -F int   [1] reduce variation in the foreground 
  32.  -G float [-1.000000] average foreground height 
  33.  -C float [0.300000] contour parameter 
  34.  -a float [2.500000] altitude of viewpoint 
  35.  -p float [4.000000] distance of viewpoint 
  36.  -c float [1.000000] contrast
  37.  -e float [0.300000] ambient light level
  38.  -v float [0.600000] vertical light level
  39. Fractal options:
  40.  -f float [0.650000] fractal dimension 
  41.  -R int   [0] rng seed, read clock if 0 
  42.  -l int   [10] # levels of recursion 
  43.  -t int   [2] # non fractal iterations 
  44.  -x       [true] cross update 
  45.  -s       [1] smoothing (0-7)
  46.  -X float [0.000000] fraction of old value for rg2 & rg3
  47.  -Y float [0.000000] fraction of old value for rg1
  48.  -H            print short description of algorithm.
  49.  
  50. This program works best on a colour display. It will work on monochrome
  51. displays but the default parameter values are not optimal for this.
  52.  
  53.  
  54. The program breaks down into three sections
  55. 1) Fractal generation (calcalt.c random.c crinkle.h) This code should be
  56.    fairly solid, It also contains some algorithmic tricks I had to
  57.    invent (though it is not inconceivable that somebody else has also
  58.    thought of them)
  59. 2) Image rendering & main program (artist.c global.c scroll.c global.h
  60.    paint.h) This code is a bit more sloppy but seems to work OK.
  61. 3) The X interface (X_graphics.c) The X interface was retro-fitted to an
  62.    earlier version of the program that was designed to use memory mapped
  63.    video hardware. As a result this code is a little crude. A more 
  64.    experienced X hacker could do better but ...
  65.  
  66. PROBLEMS
  67.  All parameters are set on the command line.
  68.  The choice of colours looks strange on some hardware.
  69.  The program will not work with Xscreensaver or virtual window 
  70. managers. This can be fixed by including vroot.h in X_graphics.c (define
  71. VROOT to cpp to do this) but I was a little wary of putting this in by default.
  72.  
  73. CHANGES from V2.1
  74. Added a -n flag to set the number of colours. This changes the same
  75. parameter as -B but you request total number of colours.
  76.  
  77. CHANGES from V1.4 
  78. The fractal generation code has been reworked. There algorithm has been
  79. extended significantly and should be able to generate much better
  80. looking surfaces. There may be a performance hit for some options though.
  81.  
  82. CHANGES from V1.3
  83. 1) There is now a flag to control the horizontal light angle.
  84. 2) negative values of the scroll parameter make the image scroll in the
  85.    opposite direction.
  86. 3) water reflections have been implemented.
  87.  
  88. CHANGES from V1.2
  89. 1) program now sleeps after a scroll rather than once per column.
  90. 2) added a -B flag to control the number of colours needed.
  91. 3) added a -q flag that clears the root window when the program exits.
  92. 4) fixed memory leak when in `map' mode.
  93.  
  94. CHANGES from V1.1
  95. Several changes including:
  96. 1) There is now a secondary (vertical) light source to add some detail to 
  97. the shadows. 
  98. 2) There is a -Z flag to reduce the CPU load, once the initial screen has
  99. been generated the program will call sleep once for each column of
  100. pixels. 
  101. 3) Xmountains creates a pixmap containing the current state of the image.
  102. This is now installed as the background pixmap of the window. This means
  103. that root-window images will remain in place if the program is stopped.
  104. The -E flag disables this feature and explicitly traps expose events
  105. instead. There may be some delay in repainting the window if both the -E
  106. and -Z flags are used at the same time.
  107.  
  108. If you have any comments/fixes etc for this program 
  109. Email me at
  110.  S.Booth@ed.ac.uk    or 
  111.  spb@epcc.ed.ac.uk
  112.  
  113. Copyright 1994 Stephen Booth, see copyright.h
  114.  
  115.  
  116.  
  117.  
  118.